package com.infore.dataReceiving.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 实时数据实体类
 */
@Entity
@Table(name="BACKCONTROL_LOG")
public class BackControlLog implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="BACKCONTROL_ID")
	@GeneratedValue(generator = "uuidGenerator")
	@GenericGenerator(name = "uuidGenerator", strategy = "uuid") // UUID生成策略
	private String id;
	
	/** 流水号 **/
	@Column(name="qn", length = 20)
	private String qn;
	
	/** 站点mn **/
	@Column(name="mn", length = 20)
	private String mn;
	
	/** 因子编号 **/
	@Column(name="project_code", length = 20)
	private String projectCode;
	
	/** 命令编号 **/
	@Column(name="cn", length = 20)
	private String cn;
	
	/** 命令描述 **/
	@Column(name="description", length = 50)
	private String description;
	
	/** 操作用户 **/
	@Column(name="operation_user", length = 20)
	private String operationUser;
	
	/** 操作时间 **/
	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@Column(name="operation_time", length = 20)
	private Date operationTime;
	
	/** ip地址 **/
	@Column(name="ip", length = 20)
	private String ip;
	
	/** 请求应答 **/
	@Column(name="response", length = 50)
	private String response;
	
	/** 执行结果 **/
	@Column(name="result", length = 50)
	private String result;
	
	/** 内容 **/
	@Column(name="content", length = 300)
	private String content;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getQn() {
		return qn;
	}

	public void setQn(String qn) {
		this.qn = qn;
	}

	public String getMn() {
		return mn;
	}

	public void setMn(String mn) {
		this.mn = mn;
	}

	public String getProjectCode() {
		return projectCode;
	}

	public void setProjectCode(String projectCode) {
		this.projectCode = projectCode;
	}

	public String getCn() {
		return cn;
	}

	public void setCn(String cn) {
		this.cn = cn;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getOperationUser() {
		return operationUser;
	}

	public void setOperationUser(String operationUser) {
		this.operationUser = operationUser;
	}

	public Date getOperationTime() {
		return operationTime;
	}

	public void setOperationTime(Date operationTime) {
		this.operationTime = operationTime;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getResponse() {
		return response;
	}

	public void setResponse(String response) {
		this.response = response;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

}
